package main

func main() {

}

type TreeNode struct {
	Val   int
	Left  *TreeNode
	Right *TreeNode
}

func mirrorTree(root *TreeNode) *TreeNode {
	if root == nil {
		return nil
	}

	node := &TreeNode{Val: root.Val}
	node.Left = mirrorTree(root.Right)
	node.Right = mirrorTree(root.Left)
	return node
}
